﻿/**
 * Jean-François Desgagné 2009 Portfolio
 * Copyright (c) 2009 Jean-François Desgagné <jfesgagne@gmail.com>
 * 
 * This work is licensed under a Creative Commons Attribution 3.0 United States License.
 * Some Rights Reserved.
 */
package com.jfdesgagne.jfdesgagne09.shell.controller {
	import org.puremvc.as3.multicore.interfaces.ICommand;
    import org.puremvc.as3.multicore.interfaces.INotification;
    import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
	
	import com.jfdesgagne.jfdesgagne09.shell.view.StageMediator;
    import com.jfdesgagne.jfdesgagne09.shell.view.LoadingMediator;
	import com.jfdesgagne.jfdesgagne09.shell.view.component.Loading;
	import com.jfdesgagne.jfdesgagne09.shell.ApplicationFacade;
	
	public class CloseLoadingCommand extends SimpleCommand implements ICommand {
        override public function execute(note:INotification):void {
			StageMediator.getInstance().stage.removeChild(LoadingMediator.getInstance().loading);
			this.facade.removeMediator(LoadingMediator.NAME);
        }
    }
}